﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlFilterEditor.ascx.cs" Inherits="Ctl_ctlFiltereditor" %>

<%@ Register src="ctlFilterItemEditor.ascx" tagname="ctlFilterItemEditor" tagprefix="uc1" %>
<asp:UpdatePanel ID="updFilterEditor" runat="server" >
<ContentTemplate >
<table cellpadding="1   " cellspacing="0" width="100%">
    <asp:ListView ID="lvWhere" runat="server" onitemcommand="lvWhere_ItemCommand" 
        onitemediting="lvWhere_ItemEditing" onitemupdating="lvWhere_ItemUpdating">
        <LayoutTemplate>                        
            <tr ID="itemPlaceholder" runat="server">
            </tr>
        </LayoutTemplate>
        <ItemTemplate>
            <tr ID="Tr2" runat="server" style="height:25px">
                <td  onmouseout="GrdItemOnMouseOut(this);" onmouseover="GrdItemOnMouseOver(this);">                    
                    <table width="100%" cellpadding ="0" cellspacing ="0" >
                    <tr>
                    <td style ="width :5px" >
                    &nbsp
                    </td> 
                    <td style ="width :20px" >
                        <asp:ImageButton ID="ImageButton2" runat="server" CommandArgument=<%# Bind("ID") %>  OnClick ="btnRemoveRow_Click"  OnClientClick ="skm_LockScreen();"  ImageUrl="~/images/icon-delete.gif" />
                        </td>                    
                    <td>
                        <table style="width:100%;" cellpadding ="0" cellspacing="0">
                            <tr>
                                <td style="width:70px; text-align :left" >
                                    <%# GetTxt_WordType((Grishko.DataTier.SqlSentence.Word)Container.DataItem)%> 
                                </td>
                                <td style="width:250px; text-align :left ">
                                    <%# GetTxt_Field((Grishko.DataTier.SqlSentence.Word)Container.DataItem)%> 
                                 </td>
                                <td style="width:250px; text-align :left ">
                                    <%# GetTxt_Operation((Grishko.DataTier.SqlSentence.Word)Container.DataItem)%> 
                                 </td>         
                                 <td>
                                    &nbsp
                                 </td>
                                 <td style="width:50%; text-align :left ">            
                                    <%# GetTxt_Value((Grishko.DataTier.SqlSentence.Word)Container.DataItem)%> 
                                 </td>         
                                <td>
                                    &nbsp   
                                </td>
                            </tr>
                        </table>
                    </td>                            
                   <td style ="width :20px" >                         
                    &nbsp   
                    <%--<asp:ImageButton ID="ImageButton3" runat="server" CommandArgument=<%# Bind("ID") %>   CommandName="Edit"   ImageUrl="~/images/icon-edit.gif" /> --%>
                   </td>
                    </tr> 
                    </table>
                    
                </td>
            </tr>
        </ItemTemplate>
        <EditItemTemplate >
        <tr ID="Tr2" runat="server" style="height:25px; vertical-align :top" >
                <td style ="vertical-align :top"  class="grd_td_item" onmouseout="GrdItemOnMouseOut(this);" 
                    onmouseover="GrdItemOnMouseOver(this);">                    
                    <table width="100%" cellpadding ="0" cellspacing ="0" >
                    <tr>
                    <td style ="width :5px" >
                    &nbsp
                    </td> 
                    <td style ="width :20px" >
                        <asp:HiddenField runat="server" Value =<%# Bind("ID") %> ID ="hfSentenceWordId"  />
                        <asp:ImageButton ID="ImageButton4" runat="server" CommandArgument=<%# Bind("ID") %>  OnClick ="btnRemoveRow_Click"  ImageUrl="~/images/icon-delete.gif" />
                        </td>
                    <td >                                          
                       <uc1:ctlFilterItemEditor  ListWhereSource =<%# _ListWhere %> SentenceWord=<%# Container.DataItem %> ImCallBind=<%# Bind("ID") %> ID="ctlFilterItemEditor1" runat="server" />
                    </td>
                    <td style ="width :15px" >                            
                           <asp:ImageButton ID="ImageButton3" runat="server" CommandArgument=<%# Bind("ID") %>   CommandName="Update" OnClientClick ="skm_LockScreen();"   ImageUrl="~/images/icon-save.gif" /> 
                        </td>
                    </tr> 
                    </table>
                    
                </td>
            </tr>        
        </EditItemTemplate>
    </asp:ListView>
</table>

<table width="100%" cellpadding ="0" cellspacing ="0" >
                    <tr>
                        <td style ="text-align :right "  >                            
                            <asp:Button ID="btnAddRecord" runat="server" Text="Добавить условие"  
                                CssClass ="btn" onclick="btnAddRecord_Click" />                        
                        </td>
                    </tr> 
    
</table>

</ContentTemplate> 
</asp:UpdatePanel> 
























